package com.xiaoxie.cloud.conifg;

import feign.Logger;
import feign.Retryer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class FeignConfig {

    @Bean
    public Retryer myRetry() {
        return Retryer.NEVER_RETRY; // 默认值是不走重试策略
        // maxPeriod:最大的间隔时间1s，最大重试次数3次，初始间隔时间为100ms
        // return new Retryer.Default(100,1,3);
    }

    @Bean
    Logger.Level feignLoggerLevel(){
        return Logger.Level.FULL;
    }
}
